const express = require('express')
const { verifyToken } = require('../utils/jwt')
const departMentContorller = require('../contorller/departMentContoller')
const router = express.Router()
//添加科室
router
.post('/addDepart',verifyToken(),departMentContorller.addDepartment)
//添加二级科室
.post('/addDepartTwo',verifyToken(),departMentContorller.addDepartment2)
//获取科室列表
.get('/getDepartList',verifyToken(false),departMentContorller.getDepartmentList)
//删除科室
.delete('/deleteDapart',verifyToken(),departMentContorller.deleteDepartment)
//修改科室信息
.put('/updateDepart',verifyToken(),departMentContorller.updateDepartment)
//关键字查询
.get('/getDepartByKey',verifyToken(false),departMentContorller.searchDepartment)
module.exports = router